package com.produce.user.controller;

import com.common.dao.base.controller.BaseController;
import com.common.dao.base.service.BaseService;
import com.produce.user.entity.OrganizationalStructure;
import com.produce.user.service.OrganizationalStructureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 类描述：组织架构的controller
 *
 * @author linzf
 */
@RestController
@RequestMapping(value = "/org")
public class OrgController extends BaseController<OrganizationalStructure> {

    @Autowired
    private OrganizationalStructureService organizationalStructureService;

    @Override
    protected BaseService<OrganizationalStructure> getService() {
        return this.organizationalStructureService;
    }

    /**
     * 功能描述：获取所有的组织架构的数据
     *
     * @return
     */
    @PostMapping("getAllOrgList")
    public Map<String, Object> getAllOrgList() {
        return organizationalStructureService.getAllOrgList();
    }

}
